summaryrefslogtreecommitdiff
path: root/frontend/app/drive/[...path]/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/drive/[...path]/page.tsx')
-rw-r--r--frontend/app/drive/[...path]/page.tsx22
1 files changed, 1 insertions, 21 deletions
diff --git a/frontend/app/drive/[...path]/page.tsx b/frontend/app/drive/[...path]/page.tsx
index bfb65ad..69db5c4 100644
--- a/frontend/app/drive/[...path]/page.tsx
+++ b/frontend/app/drive/[...path]/page.tsx
@@ -1,26 +1,6 @@
1import { DriveDirectoryView } from "@/components/drive/DriveDirectoryView" 1import { DriveDirectoryView } from "@/components/drive/DriveDirectoryView"
2import { Drive_ls } from "@/lib/drive_server" 2import { Drive_ls } from "@/lib/drive_server"
3 3import { fetchStorageData } from "@/lib/storage"
4async function fetchStorageData() {
5 try {
6 const response = await fetch(`${process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:3000' : ''}/api/storage`, {
7 cache: 'no-store'
8 })
9 if (!response.ok) {
10 throw new Error('Failed to fetch storage data')
11 }
12 return await response.json()
13 } catch (error) {
14 console.error('Failed to fetch storage data:', error)
15 // Return zeros on error as requested
16 return {
17 activeDriveUsage: 0,
18 totalDiskCapacity: 0,
19 totalDiskUsed: 0,
20 availableDisk: 0
21 }
22 }
23}
24 4
25export default async function DriveDirectoryPage({ 5export default async function DriveDirectoryPage({
26 params, 6 params,